package com.example.demo.controller;

import com.example.demo.service.LoginService;
import com.example.demo.vo.Result;
import com.example.demo.vo.params.LoginParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;

    @RequestMapping("login")
    public Result login(@RequestBody LoginParams loginParams){
        // 登录——验证用户访问
        return loginService.login(loginParams);
    }
}
